﻿using System;
using System.Collections.Generic;
using System.Text;
using T.FAS.Runtime.Base.Entity;
using T.FAS.Runtime.Metadata.Entity.DataModel;

namespace T.FAS.Runtime.Metadata.Entity.Page
{
    public class DependencyCDO 
    {
        /// <summary>
        /// CompositeDataObject
        /// </summary>
        public CompositeDataObject MetaData { get; set; }
        /// <summary>
        /// 旧Schema表达式
        /// </summary>
        public string OldTopRefSchemaExpr { get; set; }
        /// <summary>
        /// 新Schema表达式
        /// </summary>
        public string NewTopRefSchemaExpr { get; set; }
        public List<CompositeNodeObjectElement> AddColumns { get; set; } = new List<CompositeNodeObjectElement>();
        public List<CompositeNodeObjectElement> DeleteColumns { get; set; } = new List<CompositeNodeObjectElement>();
        public List<ChangeElement> ModifyColumns { get; set; } = new List<ChangeElement>();
        public List<ChangeCNO> ChangeCNOs { get; set; } = new List<ChangeCNO>();
    }
    public class ChangeCNO
    {
        public bool IsRoot { get; set; }
        public string TableAlias { get; set; }
        public CompositeNodeObject CNO { get; set; }
        public List<TAttribute> Attributes { get; set; } = new List<TAttribute>();
        public List<DataColumn> Columns { get; set; } = new List<DataColumn>();
        public List<CompositeNodeObjectElement> ChildAddColumns { get; set; } = new List<CompositeNodeObjectElement>();
        public List<CompositeNodeObjectElement> ChildDeleteColumns { get; set; } = new List<CompositeNodeObjectElement>();
        public  List<ChangeDataColumn> ChildModifyColumns { get; set; } = new List<ChangeDataColumn>();

    }
}
